package com.leef.oauth.data.api;

import com.leef.oauth.data.pojo.Key;
import com.leef.oauth.data.pojo.Result;

import java.util.Map;

import io.reactivex.Flowable;
import retrofit2.Response;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.QueryMap;

/**
 * Created by IWALL on 2017/3/14.
 * Interface API
 * "https://andaily.com/spring-oauth-server/"
 * "{"guid":"612025cb3f964a64a48bbdf77e53c2c1","archived":false,"username":"mobile","phone":"","email":"mobile@wdcy.cc","privileges":["MOBILE"]}"
 */

public interface ApiService {
    @GET("m/user_info")
    Flowable<Response<Result>> resource(@QueryMap Map<String, String> map);

    //  获取用户的对称密钥
    @POST("rest/user/getKey")
    Flowable<Response<Key>> getKey(@QueryMap() Map<String, String> map);
}
